<template>
  <view :class="['m-icon','m-icon-'+type, { fill: fill }]" @click="onClick()"></view>
</template>

<script>
  export default {
    props: {
      /**
       * 图标类型
       */
      type: String,
      fill: Boolean
    },
    methods: {
      onClick() {
        this.$emit('click')
      }
    }
  }
</script>

<style>
  @import "./m-icon.css";

  .m-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .fill {
    padding: 20rpx;
    border-radius: 14rpx;
    font-size: 38rpx;
  }
</style>